package com.abc.scholarship.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-07-04  14:01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_major_grade_num")
@AllArgsConstructor
@NoArgsConstructor
public class MajorGradeNum {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 年纪+班级
     */
    @TableField("major_grade")
    private String majorGrade;

    /**
     * 人数
     */
    @TableField("num")
    private Integer num;

    public MajorGradeNum(String majorGrade, Integer num) {
        this.majorGrade = majorGrade;
        this.num = num;
    }

    public MajorGradeNum(String majorGrade) {
        this.majorGrade = majorGrade;
        this.num = 0;
    }
}
